home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / netz / ums / ums-beta / developer / c / slib / umslib.c < prev    next >
C/C++ Source or Header  |  1994-01-23  |  464b  |  31 lines

  1.  
  2. #include <constructor.h>
  3. #include <proto/exec.h> 
  4. #include <proto/ums.h>
  5.  
  6. void __regargs __autoopenfail(char *);
  7.  
  8. extern LONG __UMSlibversion;
  9.  
  10. struct Library *UMSBase ;
  11. static struct Library *LibBase;
  12.  
  13. CBMLIB_CONSTRUCTOR(OpenUMS)
  14.  
  15. {
  16.  if (UMSBase=LibBase=OpenLibrary("ums.library",__UMSlibversion)) return 0;
  17.  
  18.  __autoopenfail("ums.library");
  19.  return 1;
  20. }
  21.  
  22. CBMLIB_DESTRUCTOR(CloseUMS)
  23.  
  24. {
  25.  if (LibBase)
  26.   {
  27.    CloseLibrary (LibBase);
  28.    LibBase=UMSBase=NULL;
  29.   }
  30. }
  31.